package cs342.project1.mathNotebook.data;

import java.util.Collection;
import java.util.List;

import cs342.project1.mathNotebook.notebook.NotebookEntry;

/**
 * Presents formulas in a notebook as an in-memory collection
 * 
 * @author Jared Schlicht
 */
public interface NotebookRepository {

	/**
	 * Gets all formulas in this notebook.
	 * 
	 * @return List of notebook entries or null if the notebook could not
	 * properly be read
	 */
	public abstract List<NotebookEntry> GetAll();

	/**
	 * Saves the notebook
	 * 
	 * @param entries formulas to save
	 * @return true if the formulas were saved, false if an error occurred
	 * while saving
	 */
	public abstract boolean Save(final Collection<NotebookEntry> entries);

	/**
	 * Closes any resources held by this repository
	 */
	public abstract void Close();
	
}